package com.itasura.decorator;

import lombok.extern.slf4j.Slf4j;

/**
 * @author sailor wang
 * @date 2018/11/22 10:55 AM
 * @description
 */
@Slf4j
public class DecoratedCoffee implements Coffee {

    private Coffee decorated;

    public DecoratedCoffee(Coffee decorated) {
        this.decorated = decorated;
    }

    @Override
    public String mark() {
        String mark = decorated.mark() + "牛奶";
        return mark;
    }

    @Override
    public Double cost() {
        Double cost = decorated.cost() + 1.5D;
        return cost;
    }
}